import {INCREMENT,DECREMENT}  from './constants';
export const createIncrementAction = data => ({ type: INCREMENT, data })//同步  返回值  普通对象
export const createDecrementAction = data => ({ type: DECREMENT, data })
export const createIncrementAsyncAction=(data,time)=>{                  //异步  返回值  函数
  return (dispath)=>{
    setTimeout(() => {
      dispath(createIncrementAction(data))
    }, time);
  }
}